package com.penglecode.commons.util;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class MemoryMonitoringUtils {

	private static final Log logger = LogFactory.getLog(MemoryMonitoringUtils.class);
	
	public static void logMemoryInfo(){
		Runtime runtime = Runtime.getRuntime();
		logger.info(">>> maxMemory : " + runtime.maxMemory() / (1024 * 1024) + ", totalMemory : " + runtime.totalMemory() / (1024 * 1024) + ", freeMemory : " + runtime.freeMemory() / (1024 * 1024));
	}
	
}
